package com.zx.service;

import com.zx.bean.Firm;
import com.zx.bean.Worker;
import com.zx.mapper.WorkerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkerService {
    @Autowired
    private WorkerMapper workerMapper;

    public int addWorker(Worker worker){
        return workerMapper.addWorker(worker);
    }

    //删除
    public int delWorker(int id){
        return workerMapper.delWorker(id);
    }
    //修改
    public Worker updateWorker(int id){
        return workerMapper.updateWorker(id);
    }
    //查询单个
    public Worker findOneWorker(int id){
        return workerMapper.findOneWorker(id);
    }
    //查询全部
    public List<Worker> findAllWorker(){
        return workerMapper.findAllWorker();
    }
}
